﻿using System;

namespace Interface
{
    public interface ICommunication : IDisposable
    {
        string[] PortNames { get; }
        string PortName { get; set; }

        int ReadTimeout { get; set; }
        int BytesToRead { get; }

        int ReadByte();

        void Write(byte[] buffer, int offset, int count);
        int Read(byte[] buffer, int offset, int count);

        void Write(string buffer);

        void Open();
        void Close();
    }
}
